home *** CD-ROM | disk | FTP | other *** search
/ FishMarket 1.0 / FishMarket v1.0.iso / fishies / 126-150 / disk_144 / analyticalc / analydocuments.arc / ANALYTCL.CRD < prev    next >
Text File  |  1987-08-25  |  24KB  |  464 lines

  1.                                AnalytiCalc
  2.                            The Analyst's Tool
  3.                        Reference Card and Summary
  4.  
  5.  
  6.       There are 2 major command modes.  The default is described  here  but the 
  7.       "/;" command enters the other and the "//" command goes back to  the mode 
  8.       described in this reference.  
  9.  
  10.       The  second  ("/;"  mode)  command format is more like other spreadsheets 
  11.       generally.   Numbers and formulas are automatically ENTERed when typed at 
  12.       the start of  a  line.  If you start a line with ", it is entered as text 
  13.       (minus the ").   If  you  start  a  line with "/" (just the slash, not in 
  14.       quotes), the remainder of the  line  is taken as a command.  Commands are 
  15.       NOT recognized unless preceded by /  in  this  mode.    Some  of the auto 
  16.       keypad keys don't work well as defaulted  in  this  mode.   To facilitate 
  17.       writing usable command procedures, the /# command swaps  the current mode 
  18.       with a saved mode.  A command file can  use  this to save and restore the 
  19.       user's command mode and use a known mode internally.
  20.  
  21.       The sheet is displayed at the top part of the  screen  and a command cell 
  22.       in Row 23 is shown with the current position encoded.   This  starts  off 
  23.       looking like
  24.  
  25.      A  1>   ("Command-mostly" mode), or
  26.      A  1:   ("Enter-mostly" mode)
  27.  
  28.       When  in "Enter-mostly" mode, begin all commands with / so that the  exit 
  29.       command  (X)  is  given as /X in that mode.  It is a  good  idea  to  use 
  30.       AnalytiCalc  in  one mode or the other most of the time;  switching modes 
  31.       can cause confusion.
  32.  
  33.       The commands available in AnalytiCalc are each described separately.  The 
  34.       following is a brief listing alphabetically of their names.
  35.  
  36.    +J filename                Start journaling to filename  
  37.    +N                         Close journal file  
  38.    <                          Rewind input file  
  39.    %prompt%cmd%key%           Issue prompt and do cmd depending on key  
  40.    $ or }                     Perform operating system command  
  41.    > or >>pattern             Search for formula  containing  or  starting with 
  42.                 pattern  
  43.    *                          Comment line  
  44.    -prompt                    Load arguments after prompt  
  45.    //                         Use "Command-Mostly" mode  
  46.    /;                         Use "Enter-Mostly" mode  
  47.    /#                         Swap current mode with  save  mode (cmd-mostly or 
  48.                 ent-mostly)  
  49.    1,2,3, or 4                Move cursor Up, Down, Left, or Right  
  50.    @file.typ                  Read file.typ as input instead of console  
  51.    AA nn {R/C}                Add absolute nn rows or columns  
  52.    AR nn {R/C}                Add relocating nn rows or columns (nn may be neg)  
  53.    CA in-range out-range      Copy All (Absolute)  
  54.    CV in-range out-range      Copy Value  
  55.    CF in-range out-range      Copy Formula (and Format)  
  56.    CR in-range out-range      Copy Relocating (all)  
  57.    DB ncol,nrow               Display Bounds (no. cols,rows on screen)  
  58.    DF range [format]          Display Format of range to format  
  59.    DL range {R/C}n:m          Display  Locate  range  as  Row/Col   to  display 
  60.                 col:row n:m  
  61.    DS{R/C}{A/D} n             Display Sort row/col, Asc/Desc row/col n  
  62.    DT range {F/I}             Display Type range as Float or Integer  
  63.    DW ncol,wid                Display Width of col "ncol" to "wid" chars  
  64.    E expression               Enter expression into cell  
  65.    E" expression              Enter expression as text, no case translation  
  66.    ED 'oldstring'newstring'   EDit cell  
  67.    ET expression              Enter expression as UPPER CASE text  
  68.    EV expression              Enter expression as computable formula  
  69.    F filename/nskip           File read from filename onto display  
  70.    G                          Get saved sheet.  Many variants.   
  71.    Hn                         HELP and show page n  
  72.    IR inrange outrange        In Place Relocate inrange as if moved to outrange  
  73.    K                          Go into interactive calculator (need *V  3).   *E 
  74.                 goes back.   
  75.    L cell                     Go to cell  
  76.    M{0/1/2/3/4/5}             Move - set move direction after enter  
  77.    MS or MH                   Macrocell  Show or Hide - show or  hide  included 
  78.                 files.   
  79.    OA cell                    Origin  Absolute  cell - Map Screen with cell  in 
  80.                 upper left  
  81.    OAD cell                   Origin  Absolute  Displace cell - Map Screen with 
  82.                 cell in upper left leaving old windowing alone  
  83.    OR cell                    Origin Relative  cell  -  map  screen dwn/rght of 
  84.                 cursor w/curs=cell  
  85.    ORD cell                   Origin  Relative  Displace   cell  -  map  screen 
  86.                 down/right of cursor with  cursor=cell  leaving 
  87.                 old windows  
  88.    OV +                       OVerride absolute refs, make relative  
  89.    OV -                       OVerride off - let abs refs be absolute  
  90.    P                          Put (save) spreadsheet.  Many variations.   
  91.    R                          Recalculate sheet  
  92.    RB cell                    Set Relocate Boundary at cell  
  93.    RE                         Recalculate   Entry  -  recalculate  only    cell 
  94.                 entered.   
  95.    RF                         Recalculate, Force recalc of constants  
  96.    RI                         Recalculate  Incremental  - Recalculate only cell 
  97.                 entered and displayed cells.   
  98.    RII                        Set  Recalc  Incremental  flag but don't actually 
  99.                 recalculate.   
  100.    RM                         Recalculate Manual - no recalc until R cmd  
  101.    S                          Setup - Global mapping/width/title setups  
  102.    TE expression              TEst  -  Evaluate  math expression in cmd mode  - 
  103.                 many variants.   
  104.    V                          View - Redraw screen  
  105.    VF                         View  Formulas  -  Draw  with Formulas instead of 
  106.                 numbers  
  107.    VM                         View Manual - no screen repaint until a V cmd  
  108.    W                          Write display to file or printer.   
  109.    X                          eXit from AnalytiCalc.  Asks for confirmation.   
  110.    ZE range                   ZEro range of cells  
  111.    ZA                         Zero All  of sheet.  Asks for confirmation.  Also 
  112.                 used for reinitializing.   
  113.  
  114.                                     AnalytiCalc Function Summary
  115.  
  116.       The available multiple argument functions are:  
  117.     SUM[variables]     Sum of all arguments 
  118.     MAX[variables]     Max of arguments 
  119.     MIN[variables]     Min of arguments 
  120.     AVG[variables]     Average of arguments 
  121.     AVE[variables]     Average of arguments excluding zero args 
  122.     STD[variables]     Standard deviation squared 
  123.     AND[variables]     Boolean AND of all variables in list 
  124.     IOR[variables]     Boolean inclusive OR of variables 
  125.     NOT[variable]      Boolean complement of variable 
  126.     XOR[v1,v2]         Boolean exclusive OR of v1,v2 
  127.     EQV[V1,V2]         Boolean "equivalence" of V1,V2 
  128.                        (complement of exclusive OR, true if 
  129.                        bits have the SAME value) 
  130.     CNT[variables]     Number of nonzero variables in list 
  131.     MOD[V1,V2]         Returns V1 modulo V2 (i.e., remainder 
  132.                        of V1/V2 division.) 
  133.     SGN[v1]            Returns 1.0 times sign of V1 
  134.     LKP[var,variables] Lookup variable in "variables" range 
  135.                        greater or equal to var, return its 
  136.                        index (starting with 0) into variables 
  137.                        range. 
  138.     LKN[var,variables] Lookup variable in "variables" range 
  139.                        less than or equal to var, return its 
  140.                        index (starting with 0) into variables 
  141.                        range. 
  142.     LKE[var,variables] Lookup variable in "variables" range 
  143.                        strictly equal to var, return its index 
  144.                        (starting with 0) into range. Note all 
  145.                        LKP, LKN, LKE return the last variable 
  146.                        index if no satisfactory value found. 
  147.     NPV[disc,vars]     Net Present Value of vars (equal time 
  148.                        interval numbers), at discount rate 
  149.                        disc where disc is a fraction 
  150.                        (e.g., .12 for 12%) 
  151.     IRR[PV,FV,returns] Internal Rate of Return. Will compute 
  152.                        internal rate of return on up to 20 
  153.                        periods, returning rate per period. 
  154.                        The returns are expected to be at 
  155.                        equal time intervals. PV and FV are 
  156.                        initial and final values of investment 
  157.                        and the result is computed via Newton 
  158.                        approximation. 
  159.      PMT[princ,inter,nper] Payment (mortgage payment per period) 
  160.                        function. Will compute payment per period 
  161.                        for principal amount "princ" with interest 
  162.                        per period as "inter" and number of periods 
  163.                        as "nper". All arguments must be cells. 
  164.                        The formula is the standard ordinary annuity 
  165.                        formula. Interest rate must be a fraction so 
  166.                        that 14% would be 0.14, for example. 
  167.      PVL[payment,inter,nper] Present Value formula. Computes present 
  168.                        value of an annuity given "payment", the payment 
  169.                        per period, interest rate per period (as a 
  170.                        fraction, so 12% is 0.12) in "inter", and 
  171.                        number of periods as "nper". All arguments 
  172.                        must be in cells. 
  173.      RND[DUM]          Generates a random number between 0. and 
  174.                        1.0. An argument is needed but it is 
  175.                        NOT touched by this function. 
  176.  
  177.      IF [V1.rel.V2] statement | else-statement 
  178.       Compares two variables and executes either "statement" (if the 
  179.        relation is true) or "else-statement" (if the relation is 
  180.        false). 
  181.       Valid relations (in the place of the .rel. above) are: 
  182.         .EQ.    Equal 
  183.         .NE.    Not Equal 
  184.         .GT.    Greater than (V1 greater than V2) 
  185.         .LT.    Less than (V1 less than V2) 
  186.         .GE.    Greater than or Equal to (V1 >= V2) 
  187.         .LE.    Less than or Equal to (V1 =< V2) 
  188.  
  189. The following single argument functions are available:  
  190.  
  191.    FUNCT NAME   ARG TYPE    FUNCT VALUE   DESCRIPTION 
  192.    ------------------------------------------------------- 
  193.    ABS          REAL        REAL         absolute value 
  194.    DABS         REAL        REAL         absolute value 
  195.    IABS         INTEGER     INTEGER      absolute value 
  196.    IFIX         REAL        INTEGER      REAL to INT conv. 
  197.    AINT         REAL        REAL         REAL truncation 
  198.    INT          REAL        INTEGER      REAL to INT conv. 
  199.    IDINT        REAL        INTEGER      REAL to INT conv. 
  200.    EXP          REAL        REAL         e**X 
  201.    DEXP         REAL        REAL         e**X 
  202.    ALOG         REAL        REAL         natural logarithm 
  203.    DLOG         REAL        REAL         natural logarithm 
  204.    ALOG10       REAL        REAL         logarithm base 10 
  205.    DLOG10       REAL        REAL         logarithm base 10 
  206.    SQRT         REAL        REAL         square root 
  207.    DSQRT        REAL        REAL         square root 
  208.    SIN          REAL        REAL         trigonometric sine 
  209.    DSIN         REAL        REAL         trigonometric sine 
  210.    COS          REAL        REAL         trig. cosine 
  211.    DCOS         REAL        REAL         trig. cosine 
  212.    TANH         REAL        REAL         hyperbolic tangent 
  213.    DTANH        REAL        REAL         hyperbolic tangent 
  214.    ATAN         REAL        REAL         arc tangent 
  215.    DATAN        REAL        REAL         arc tangent 
  216.  
  217.       The following special constructs in a formula act as functions:  
  218.        _@V1,V2 Means get the values  stored in V1 and V2 and use them as column 
  219.     and row locations pointing at some  cell  in  the  sheet.   Replace the 
  220.     construct with the name of that cell.  
  221.  
  222.        _#V1 Means take the real number in  cell  V1  and unpack it as if it had 
  223.     been a packed value from a formula with  8  characters  packed;    then 
  224.     convert it back into ASCII and place in the  formula  in  place of this 
  225.     construct.   This construct is intended to be used with  the  *U  STRVL 
  226.     function  to  allow  retrieval  and  edit  of  formulas.  The *U  XQTCM 
  227.     function  permits  use  of  the  EDit  command within a cell for string 
  228.     manipulation.  
  229.  
  230.       The following  "equation commands" also act as functions with the effects 
  231.     described:  
  232.  
  233.   *@filename   Where filename is  the  name  of  a file of CALC commands.  CALC 
  234.              reads the file and executes the commands.  
  235.  
  236.   *ASCII       Declares a list of variables to be of type ASCII.  
  237.   *C           COMMENT line.  
  238.   *N           NOVIEW.  
  239.   *V           VIEW.  Controls printing options in K mode 
  240.   *R           READ.  Allows a single line to be read from the terminal.  
  241.   *REAL        Declares specified variables to be REAL*8.  
  242.   *DECIMAL     Declares specified variables to be REAL*8.  
  243.   *S           STOP.  Same as *E.  Goes back to spreadsheet.  
  244.   *E           EXIT.  Gets out of K mode, back to spreadsheet mode.  
  245.   *Z           ZERO.  Zeroes all accumulators.  
  246.   *G        *G V1,V2 (where V1  and  V2  are  cell  or  accumulator names) will 
  247.              evaluate V1 and V2 as  the  column and row numbers, on the 
  248.              physical sheet, of the desired cell.  The addressed cell's 
  249.              value is retrieved and used as the resulting number.  
  250.  
  251.   *W        Takes  the value at the current cell  and  writes  it  out  to  the 
  252.              formula as a numeric (float- ing) value.   The *WF command 
  253.              stores  the  cell  similarly,  but uses the format of  the 
  254.              current cell instead of the D32.25 format used for *W.  
  255.  
  256.   *P        The  *P  command  resets the current cell coordinate from within  a 
  257.              cell  (until  the  next  cell  is evaluated only).  It has 
  258.              several forms:  
  259.  
  260.              *P -  By  itself,  *P  causes  Calc to prompt for the new physical 
  261.              column and row number.  
  262.  
  263.              *P V1 - This moves the current location to the named cell where V1 
  264.              is the cell name (e.g.  A5, H2) 
  265.  
  266.              *P@ V1,V2 - This  uses  V1  and  V2 (cell names) as column and row 
  267.              numbers and changes the current  physical cell position to 
  268.              that defined by the contents of  cells  V1  and  V2.  This 
  269.              gives  complete  addressing of the sheet from  within  any 
  270.              cell.  
  271.  
  272.   *F        *F Label - If the value in %  is  positive and nonzero this command 
  273.              rewinds  the input file for the AnalytiCalc @ command  and 
  274.              seeks  a line beginning with the characters *CLabel (where 
  275.              "label" is what you put after the *F command).  
  276.  
  277.   *J        *J Label  -  This command behaves as the *F command but operates on 
  278.              the file used  by  the  Calc  *@  command  rather than the 
  279.              AnalytiCalc one.  
  280.  
  281.   *QF 
  282.   *QW       The  *QF (Float) or  *QW  (write)  commands  are  used  to  examine 
  283.              sequential  files created outside AnalytiCalc  and  return 
  284.              values or formulas.  Their syntax is 
  285.  
  286.            *QF filename ?key1? ?key2? <lm> 
  287.         or *QW filename ?key1? ?key2? <lm> 
  288.                where ?key2? is optional 
  289.                l and m are delimiter characters  for start and end of the parts 
  290.              of the selected records to extract (defaults to first part 
  291.              of the record) filename is just the file  specifier in the 
  292.              host  OS.    The  *QF  command  gets a part  of  a  record 
  293.              containing  the  keys specified and turns it into a number 
  294.              ("floats"  it).    The *QW command Writes that part of the 
  295.              record to  a  formula.  The special characters in the <lm> 
  296.              part of the  com-  mand  are  delimiters of the area to be 
  297.              picked out.  Variant  forms  allow  such choosing to be by 
  298.              column number instead of key character if needed.  
  299.  
  300.   *U YRMOD VY,VM,VD 
  301.                returns the Julian date (in  %)  computed from the Year (in VY), 
  302.              the month (in VM) and the  day  (in VD), where VY, VM, and 
  303.              VD  are sheet cells.  These may  be  the  result  of  date 
  304.              arithmetic.  
  305.  
  306.   *U JDATE Var 
  307.                assumes  the  formula  in cell Var (any spreadsheet  cell  name) 
  308.              contains a date string in the format YY/MM/DD.   It  reads 
  309.              this  formula  and  converts  the  date  to a Julian date, 
  310.              returning it in the % accumulator.  
  311.  
  312.   *U JTOCH Jul,Var 
  313.                assumes that  variable  Jul  (any  spreadsheet  cell) contains a 
  314.              Julian date and  changes  it  into  an ASCII string in the 
  315.              cell whose name is in the Var position here.  
  316.  
  317.   *U DATE VY,VM,VD,Var 
  318.                uses VY, VM, and  VD  as  year,  month  and  day, and computes a 
  319.              Julian date from them.   It  then composes an ASCII string 
  320.              of form YY/MM/DD for that date and stores in the for- mula 
  321.              for Var.  
  322.  
  323.   *U WKDYS D1,D2 
  324.                computes the number of workdays between Julian  dates  D1 and D2 
  325.              just  as taking the difference of two Julian  dates  gives 
  326.              differences between calendar dates in days.  
  327.  
  328.   *U WKDIN D1,N1 
  329.                returns a Julian date that is N1 work days after the date in D1.  
  330.  
  331.   *U IDATE() 
  332.                returns the current date as a Julian day.  
  333.  
  334.   *U MTXEQ(AA:AA,XX:XX,BB:BB) 
  335.                solves equation AX=B where A, X, and B are  matrices,  and where 
  336.              the  notation AA:AA means two cells at the upper left  and 
  337.              lower right edges of matrix A (e.g.  B2:C3 for the  2  X 2 
  338.              matrix so defined), and the XX:XX and BB:BB notation means 
  339.              the same for the X and B matrices.  
  340.  
  341.   *U MOVEV mtxa,mtxb 
  342.                moves values from mtxa to mtxb (useful prior to calling MTXEQ).  
  343.  
  344.   *U MDET mtx 
  345.                This function computes  and  returns  the  determinant of matrix 
  346.              mtx.  
  347.  
  348.   *U MPROD A,B,C 
  349.                This function will multiply  matrix  A by matrix B giving matrix 
  350.              C, provided that their dimensions are compatible.  
  351.  
  352.   *U MADDV A,B,C 
  353.                This function adds matrix A  to matrix B and stores in matrix C.  
  354.              All matrices must have the same dimensions.  
  355.  
  356.   *U MSUBV A,B,C 
  357.                This  function  subtracts matrix B from  matrix  A  leaving  the 
  358.              result in matrix C.  
  359.  
  360.   *U MMPYT A,B,C 
  361.                This  function  multiplies  matrix  A-transpose  by matrix B and 
  362.              stores  the  result  in  matrix  C;    dimensions  must be 
  363.              compatible.  
  364.   *U MMPYC A,B,K 
  365.                This function  multiplies  every element of matrix A by constant 
  366.              K.  
  367.  
  368.   *U VARY X,A,W,I,P;Q;R;S;T;U;V;W 
  369.                (Equation Solving by Iterative Search) 
  370.                This function allows  AnalytiCalc  to  automatically  search for 
  371.              solutions to equations over  up  to  8  dimensions.    The 
  372.              operation is that the accumulators  named  in  the  fields 
  373.              shown as P;Q;R;S;T;U;V;W (one to 8  may be specified, only 
  374.              one is required) are varied by a  fraction  W  about their 
  375.              initial values (later scaled down by the gradient  of  the 
  376.              change in X) to attempt to get accumulator or  cell  X  to 
  377.              equal  accumulator  or  cell  A.    This  is  done  for  I 
  378.              iterations, where I is another accumulator.  
  379.  
  380.   *U XQTCM command will execute the  command  (terminated  by the end-of-line), 
  381.              with any command except  X  or  K permitted, from inside a 
  382.              cell.  This allows command  files  driven  from  cells  to 
  383.              control moving data, etc.  
  384.  
  385.   *U STRVL V1,start;len 
  386.                  will return a value that is made from  up  to  8 characters in 
  387.              the  FORMULA  of  cell  V1  (where V1 is any  cell  name), 
  388.              starting at character "start" and for "len" characters. 
  389.  
  390.   *U HERE 
  391.                  will return the current location on the matrix and the current 
  392.              maximum row and column used.  
  393.  
  394.   *U  FFTFW and *U FFTRV perform Fast Fourier Transforms  in  the  forward  and 
  395.              reverse (inverse) directions on the given range of data.  
  396.  
  397.   *U LINEF Vy:Vy,Vx:Vx (with the Vx range optional) fits a line to the input range.  
  398.  
  399.   *XV filename V1 
  400.   *XF filename V1        The *X class commands are for sheet linkages.  
  401.                *XF loads a Formula from  another  saved  spreadsheet, while *XV 
  402.              loads a Value.  
  403.  
  404.       The  following  *U DBxxxxxx functions also  exist  as  commands  of  form 
  405.              FILxxxxxx with the same results.  
  406.  
  407.   *U DBOPINS range filename - Open  input  sequential on filename for cells  in 
  408.              range.  (Reads of input range formulas come from file when 
  409.              enabled.)
  410.  
  411.   *U DBOPINR range filename Open input random on filename for cells in range 
  412.  
  413.   *U DBOPINU  range filename Open  range  for  update  on filename for read and 
  414.              write as random access.
  415.  
  416.   *U DBCLSINP Close input 
  417.  
  418.   *U DBCLSOUT Close output 
  419.  
  420.   *U DBOPOUTS range filename Open  output  sequential    from  range  cells  to 
  421.              filename.  (Writes of  formulas  in  output  range  go  to 
  422.              file.)
  423.  
  424.   *U DBOPOUTR range filename Open output random from range on filename 
  425.  
  426.   *U DBENAINP Enable input file readin (initially disabled) 
  427.  
  428.   *U DBENAOUT Enable output write (initially disabled) 
  429.  
  430.   *U DBDISINP Disable input area readin 
  431.  
  432.   *U DBDISOUT Disable output write 
  433.  
  434.   *U DBEDTINP range Enables input and output and,  for  each  cell in the given 
  435.              range,  reads  and  writes  the cell,  allowing  the  file 
  436.              read/writes to take effect.  Each cell is flagged as valid 
  437.              but of text type;  the DF command  must  be  used to reset 
  438.              any  that  should  be  treated  as computable.  Input  and 
  439.              output are disabled on completion of the command.  
  440.  
  441.   *U DBFMTOUT range 
  442.   *U  DBVALOUT  range Enables  input and output and for each cell of the  range 
  443.              takes  the  VALUE of the cell, reads the cell, sets it  of 
  444.              text  type, and writes the text equivalent of its value to 
  445.              the cell.
  446.  
  447.   *U  DBCMPFRM  V1:V2[,V3:V4] Compares two  formulas.    It  returns,  in the % 
  448.              accumulator, the index  of  the  formula in cell V2 in the 
  449.              formula in cell V1.    Lengths  used  are  those  of  both 
  450.              formulas UNLESS the V3 and  V4  cell  arguments  are seen.  
  451.              Then V3 and V4 are lengths  of  V1  and  V2  strings used.  
  452.              Accum.  W is set to comparison of V1 and V2 (-1/0/+1)
  453.  
  454.   *U  DBLENFRM  V1:V2 returns the length of the formula for  cell  V1  in the % 
  455.              accumulator and in cell V2 IF CELL V2 IS VALID.  Otherwise 
  456.              the  cell  specified in V2 is ignored, though it  must  be 
  457.              present in the command or function.  
  458.  
  459.   *U  DBTRMFRM  V1:V2,V3,V4 Reads the formula in V1 and uses V3 and V4 as start 
  460.              and  end  byte  numbers  within it.  It returns to V2  the 
  461.              formula that  is between the start and end bytes, trimming 
  462.              the V1 formula  into  V2  by  chopping  out  the undesired 
  463.              parts.
  464.